﻿/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __27D74A39_3D0E_432d_9806_F900663C5768__
#define __27D74A39_3D0E_432d_9806_F900663C5768__

#include "../tools/head.h"

/////////////////////////////////////////////////////////////////////////////////////////
// 

namespace xos_aio
{
    class aio_impl;
    class aio_key;

    class aio_udp
    {
    public:
        aio_udp( aio_impl * pAioImpl );
        ~aio_udp();

    protected:
        aio_impl * m_pAioImpl;

    public:
        int user_init( xos_box::i_msg * lpMsg );

        int user_send( xos_box::i_msg * lpMsg );
        int udp_send( aio_key * lpKey );

        int user_recv( xos_box::i_msg * lpMsg );
        int udp_recv( aio_key * lpKey );

        int shut_down( xos_box::i_msg * lpMsg );
        int close_net( xos_box::i_msg * lpMsg );
    };
} // xos_aio

#endif // __27D74A39_3D0E_432d_9806_F900663C5768__
